write "<MAP NAME=" & quote & "map" & quote & ">" & break to file f
repeat with i=1 to the number of lines of list
write "<AREA SHAPE=" & quote & "rect" & quote && "COORDS=" & quote & word 2 of line i of list & quote && "HREF=" & quote & word 1 of line i of list & quote & ">" & break to file f
end repeat
write "</MAP>" & break & break to file f
write "</BODY>" & break & break & "</HTML>" & break to file f
--
close file f
--
put destinationFolder & cName & ".map" into f
open file f
repeat with i=1 to the number of lines of list
write "rect" && word 1 of line i of list && item 1 to 2 of word 2 of line i of list && item 3 to 4 of word 2 of line i of list & break to file f
end repeat
close file f
--
set cursor to busy
put trueScreenshot() into f
if word one of f is not "ok" then
return "Could not take screenshot." & return & f --∆
end if
delete word one of f
--
set cursor to busy
put "tell application" && quote & "clip2gif" & quote & return into s
--
put "save file" && quote & f & quote && "as " after s
if ext is "jpeg" then put "JPEG" after s
else put "GIF" after s
--
put " in file" && quote & destinationFolder & cName & "." & ext & quote after s
put " crop {" && rect of card window && "}" after s
if ext is "jpeg" then put " quality" && quality after s
--
put " depth 8 transparency no scale 100" && "colors palette input colors" after s
if ext is "gif" then put " interlacing" && interlace after s
put return & "end tell" after s
--
if the optionKey is down then answer s
do s as AppleScript
--
set cursor to busy
eraseFile f
if the result is not empty then
return "Could not erase screen shot." & return & "eraseFile" && the result --∆